<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>添加课程</title>
    <link rel="stylesheet" href="__ADMIN__/css/pintuer.css">
    <link rel="stylesheet" href="__ADMIN__/css/admin.css">
    <script src="__ADMIN__/js/jquery.js"></script>
    <script src="__ADMIN__/js/pintuer.js"></script>
</head>
<body>
<div class="panel admin-panel">
    <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>添加课程信息</strong></div>
    <div class="body-content">
        <form method="post" class="form-x" action="" id="form-add">
            <div class="form-group">
                <div class="label">
                    <label>课程名称：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" name="name" data-validate="required:请输入课程名称" />
                    <div class="tips"></div>
                </div>
            </div>

            <div class="form-group">
                <div class="label">
                    <label></label>
                </div>
                <div class="field">
                    <a class="button bg-main icon-check-square-o" onclick="add()"> 提交</a>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
function add() {
    var da = $("#form-add").serialize();
    $.ajax({
        type: 'POST',
        url: '/admin/course/add',
        data: da,
        dataType: 'json',
        success: function (res) {
            if (res.status == 1) {
                alert(res.msg);
            } else {
                alert(res.msg);
            }

        },
    })
}
</script>
</body></html>